import {defineConfig} from 'vite';
import vue from '@vitejs/plugin-vue';
import path from 'path';

// @ts-ignore
import peerDepsExternal from 'rollup-plugin-peer-deps-external';

export default defineConfig({
  plugins: [vue(), peerDepsExternal(),],
  build: {
    copyPublicDir: false,
    lib: {
      entry: path.resolve(__dirname, 'lib/index.ts'),
      name: 'SlotEvents',
      fileName: 'index'
    },
    rollupOptions: {
      output: {
        exports: 'named',
        globals: {
          vue: 'Vue'
        }
      }
    }
  }
});
